import java.util.Locale;
import java.util.TreeSet;

public class CountryWithCountryCode 
{
	public static void main(String[] args) 
	{
		Locale loc = new Locale("en_US");
		String countryName, countryCode;
		Locale [] locale = Locale.getAvailableLocales();
		
		TreeSet<String> country = new TreeSet<String>();
		for(int i=0; i<locale.length; i++)
		{
			Locale l = locale[i];
			countryName = l.getDisplayCountry(loc);
			// System.out.println(i+" : " + countryName.length());
			if(countryName.length() > 0)
			{
				countryCode = l.getISO3Country();
				System.out.println(i +","+countryName +","+ countryCode);	
			}
			
		}
		
	}

}
